package com.app.repository.interfaces;

import com.app.model.main.Favorite;

import java.util.List;

public interface FavoriteMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Favorite record);

    int insertSelective(Favorite record);

    Favorite selectByPrimaryKey(Long id);

    Favorite selectByParam(long userId, String time);

    int updateByPrimaryKeySelective(Favorite record);

    int updateByPrimaryKey(Favorite record);

    List<Favorite> getListOrderedByIdDESC(long userId, long lastId, int page, int number, byte type);

    List<Favorite> getListOrderedByIdASC(long userId, long lastId, int page, int number, byte type);

    long getMaxId();

    Favorite getFlagWithParam(long userId, long objectId, byte type);

    long getFavoriteNumber(long objectId, byte type);
}